CXX := g++
CXXFLAGS := -Wall -std=c++17
STATIC_LIBS := /usr/local/lib/libredis++.a /usr/lib/x86_64-linux-gnu/libhiredis.a  
TARGETS := testping generic list string set zset hash
SRCS := $(wildcard *.cc)

.PHONY : all
all : $(TARGETS)
%:%.cc
	$(CXX) $(CXXFLAGS) -o $@ $< $(STATIC_LIBS) 
.PHONY:clean
clean:
	rm -f $(TARGETS)

# CXX := g++
# CXXFLAGS := -Wall -std=c++17
# LDFLAGS := -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu -Wl,-rpath=/usr/local/lib
# LIBS := -lhiredis -lredis++ -pthread
# TARGETS := testping generic
# SRCS := $(wildcard *.cc)

# .PHONY : all
# all : $(TARGETS)
# %:%.cc
# 	$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
# .PHONY:clean
# clean:
# 	rm -f $(TARGETS)